package com.atmc.controller;

import com.atmc.entity.PetsInfo;
import com.atmc.service.PetsInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @BelongsProject: SpringCloud1216
 * @BelongsPackage: com.atmc.controller
 * @Author: chuyings
 * @CreateTime: 2022-11-17  13:21
 * @Version: 1.0
 */
@RestController
@CrossOrigin
public class PetsInfoController {
    @Autowired
    PetsInfoService petsInfoService;
    //渲染所以领养宠物的所有的信息
    @RequestMapping("/petsInFos")
    public List<PetsInfo> getPetsAll(){
        return petsInfoService.queryAll();
    }
}
